import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
/* prettier-ignore */
/* const token: String = "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6Inh1ZGFkYSIsInVzZXJJZCI6ImE2NzZkYWZkNzVkYzExZWY4ZjUyMDAxNjNlMDEyMzA1IiwiZXhwIjoxNzI3Njc5NjQ2fQ.6ft7Qi_fu1Jcvk3aMB9PASIRnn7Hcrt53RwJ5gLpCCM" */
export const getTagList = () => {
  return http.request<any>("get", baseUrlApi("tag/list"));
};

// 上传图片
/* export const uploadImage = (data: any) => {
  return http.request("post",
    baseUrlApi("common/newsUpload"),
    { data },
    {
    headers: {
      "Content-Type": "multipart/form-data",
      Authorization: "Bearer " + token
    }
  });
};
 */
// 发布文章
export const publishArticle = (data: any) => {
  return http.request(
    "post",
    baseUrlApi("news/addNews"),
    { data },
    {
      headers: {
        "Content-Type": "application/json"
      }
    }
  );
};
